package com.yonyou.cyxdms.sysAuth.service.dto;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import java.io.Serializable;


/**
 * <p>
 * 受控权限表
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */

public class PermissionCtrlDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 受控权限id
     */
        private Integer permissionCtrlId;
        /**
     * 权限类型，用于区分哪个的权限，例（用户权限，职位权限，角色权限）
     */
        private Integer permissionType;
        /**
     * 权限id
     */
        private Integer permissionId;
        /**
     * 控制类型(使用1042 进行关联)
     */
        private Integer type;
        /**
     * 控制代码
     */
        private String ctrlCode;
        /**
     * 是否柔性
     */
        private Integer isFlexible;
        /**
     * 默认权限
     */
        private Integer isEmpowered;
            private Boolean isDeleted;
    
    public PermissionCtrlDTO() {
        super();
    }




    public Integer getPermissionCtrlId() {
        return permissionCtrlId;
    }


    public void setPermissionCtrlId(Integer permissionCtrlId) {
        this.permissionCtrlId = permissionCtrlId;
    }



    public Integer getPermissionType() {
        return permissionType;
    }


    public void setPermissionType(Integer permissionType) {
        this.permissionType = permissionType;
    }



    public Integer getPermissionId() {
        return permissionId;
    }


    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }



    public Integer getType() {
        return type;
    }


    public void setType(Integer type) {
        this.type = type;
    }



    public String getCtrlCode() {
        return ctrlCode;
    }


    public void setCtrlCode(String ctrlCode) {
        this.ctrlCode = ctrlCode;
    }



    public Integer getIsFlexible() {
        return isFlexible;
    }


    public void setIsFlexible(Integer isFlexible) {
        this.isFlexible = isFlexible;
    }



    public Integer getIsEmpowered() {
        return isEmpowered;
    }


    public void setIsEmpowered(Integer isEmpowered) {
        this.isEmpowered = isEmpowered;
    }



    public Boolean getDeleted() {
        return isDeleted;
    }


    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }



    @Override
    public String toString() {
        return "PermissionCtrlDTO{" +
        "permissionCtrlId=" + permissionCtrlId +
        ", permissionType=" + permissionType +
        ", permissionId=" + permissionId +
        ", type=" + type +
        ", ctrlCode=" + ctrlCode +
        ", isFlexible=" + isFlexible +
        ", isEmpowered=" + isEmpowered +
        ", isDeleted=" + isDeleted +
        "}";
    }
    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param poClass dto 需要转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param po 需要转换的对象
     * @author quankk
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "permissionCtrlId");
    }

}
